# Copyright (c) Meta Platforms, Inc. and affiliates.

load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
load("../../defs.bzl", "zs_cxxbinary")

oncall("data_compression")

zs_cxxbinary(
    name = "zs2_core_mlselector",
    srcs = [
        "core_model.c",
        "zs2_core_mlselector.c",
    ],
    headers = [
        "core_model.h",
    ],
    deps = [
        "../..:zstronglib",
        "../../tools:fileio",
        "../../tools:zstrong_ml",
    ],
)

zs_cxxbinary(
    name = "zs2_mlselector",
    srcs = ["zs2_mlselector.cpp"],
    headers = ["model.h"],
    deps = [
        "../..:zstronglib",
        "../../tools:fileio",
        "../../tools:zstrong_cpp",
        "../../tools:zstrong_ml",
    ],
    external_deps = [
        "CLI11",
    ],
)

python_binary(
    name = "train_model",
    main_function = ".train_model.main",
    main_src = "train_model.py",
    deps = [
        "../../tools/py:zstrong_ml",  # @manual
        "fbsource//third-party/pypi/click:click",
        "fbsource//third-party/pypi/numpy:numpy",
        "fbsource//third-party/pypi/pandas:pandas",
        "fbsource//third-party/pypi/scikit-learn:scikit-learn",
        "fbsource//third-party/pypi/xgboost:xgboost",
    ],
)

python_binary(
    name = "generate_data",
    main_function = ".generate_data.main",
    main_src = "generate_data.py",
    deps = [
        "fbsource//third-party/pypi/click:click",
        "fbsource//third-party/pypi/numpy:numpy",
        "//manifold/clients/python:manifold_client",
    ],
)
